﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using ActivePalControls.ControlsData;
using ActivePalInterop.Data;

namespace ActivePalControls
{
    /// <summary>
    /// Interaction logic for PersonalData.xaml
    /// </summary>
    public partial class PersonalData : UserControl
    {
        public string PersonalFirstName
        {
            get { return PersonFirstName.tboxInput.Text.Trim(); }            
            set { PersonFirstName.tboxInput.Text = value; }
        }

        public string PersonalLastName
        {
            get { return PersonLastName.tboxInput.Text.Trim(); }
            set { PersonLastName.tboxInput.Text = value; }
        }

        public double PersonalAge
        {
            get { return Convert.ToDouble(PersonAge.tboxInput.Text.Trim()); }
            set { PersonAge.tboxInput.Text = value.ToString() ; }
        }

        public Gender PersonalGender
        {
            get { return GenderConverter.ToGender(PersonGender.cbOptions.SelectedItem.ToString().Trim()); }
            set { PersonGender.cbOptions.SelectedItem = value; }
        }

        public double PersonalBMI
        {
            get { return Convert.ToDouble(PersonBMI.tboxInput.Text.Trim()); }
            set { PersonBMI.tboxInput.Text = value.ToString(); }
        }

        public double PersonalHeight
        {
            get { return Convert.ToDouble(PersonHeight.tboxInput.Text.Trim()); }
            set { PersonHeight.tboxInput.Text = value.ToString(); }
        }

        public double PersonalWeight
        {
            get { return Convert.ToDouble(PersonWeight.tboxInput.Text.Trim()); }
            set { PersonWeight.tboxInput.Text = value.ToString(); }
        }

        public string PersonalDesease
        {
            get { return PersonDesease.RichValue.Trim(); }
            set { PersonDesease.RichValue = value; }
        }

        public PersonalData()
        {
            InitializeComponent();
        }
    }
}
